#include "Avalon/UidServiceTests/UidServiceTests.hpp"
#include <boost/lexical_cast.hpp>
#include "Avalon/ServiceLocator/ServiceLocatorClient.hpp"

using namespace Avalon;
using namespace Avalon::IO;
using namespace Avalon::IO::Tests;
using namespace Avalon::ServiceLocator;
using namespace boost;
using namespace std;

void UidService::Tests::RegisterTestUidService(
    ServiceLocatorClient* serviceClient,
    MockServerConnection* serverConnection, const string& dataShuttle) {
  string service = "{"
    "\"name\": \"uid_service\","
    "\"channel\": {"
    "  \"type\": \"test\","
    "  \"address\": " + lexical_cast<string>(reinterpret_cast<intptr_t>(
      serverConnection)) +
    "},"
    "\"data_shuttle\": {"
    "  \"type\": \"" + dataShuttle + "\""
    "}}";
  serviceClient->Register("uid_service", service);
}
